/**
 * Copyright 2016-2017 TVI Go Easy.
 * Created on 2017/4/18 14:31
 */
package org.mechanic.fund.domain.product;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.mechanic.fund.domain.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 基准指数实体类
 *
 * @author mechanic
 * @version 0.0.1
 */
@Entity
@Table(name = "product_stocks_index_type")
public class ProductStocksIndexType extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 8023944453629922150L;
    /**
     * 名称
     */
    @Column(name = "name")
    private String name;
    /**
     * 排序序号
     */
    @Column(name = "sort", columnDefinition = "TINYINT(1)")
    private Integer sort;

    public ProductStocksIndexType() {
    }

    public ProductStocksIndexType(
      String id,
      String name,
      Integer sort,
      String createUser,
      LocalDateTime createTime,
      String updateUser,
      LocalDateTime updateTime) {
        super.id = id;
        this.name = name;
        this.sort  = sort;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
